package com.zyc.webtest.service.impl;

import com.zyc.webtest.dao.SysMenuRepository;
import com.zyc.webtest.domain.SysMenuEntity;
import com.zyc.webtest.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

/**
 * Created by zyc on 2017/4/26.
 */
@Service("sysMenuService")
public class SysMenuServiceImpl extends BaseServiceImpl<SysMenuEntity,Integer> implements SysMenuService {

    @Autowired
    private SysMenuRepository sysMenuRepository;

    @Override
    public JpaRepository getDao() {
        return sysMenuRepository;
    }

    @Override
    public Optional<List<SysMenuEntity>> findRoleMenu(String role_name) {
        return sysMenuRepository.findRoleMenu(role_name);
    }
}
